package net.monare.mifss.evn;

import com.vaadin.ui.Button;
import com.vaadin.ui.UI;
import net.monare.mifss.admin.ui.win.ConfigureStorageWindow;
import net.monare.mifss.admin.ui.win.RemoveApiKeyWindow;
import net.monare.mifss.configurations.pojo.ApiKey;

/**
 * Created by jernej on 4/22/14.
 */
public class VerifyRemoveSelectedApiKeyListener implements Button.ClickListener {

    private ApiKey apiKey;
    private final ConfigureStorageWindow parent;
    private String storageDefName;

    public VerifyRemoveSelectedApiKeyListener(ConfigureStorageWindow parent ,ApiKey apiKey, String storageDefName){
        this.apiKey = apiKey;
        this.parent = parent;
        this.storageDefName = storageDefName;
    }

    @Override
    public void buttonClick(Button.ClickEvent event) {
        UI.getCurrent().addWindow(new RemoveApiKeyWindow(parent, apiKey, storageDefName));
    }


}
